

const {ccclass, property} = cc._decorator;

@ccclass
export default class StartTs extends cc.Component {

    @property(cc.Node)
    sideBtn:cc.Node;
    @property(cc.Prefab)
    sidePrefab:cc.Prefab;

    onLoad(){
        console.log('start load');

        if (cc.sys.platform!=cc.sys.BYTEDANCE_GAME) {
            this.sideBtn.active=false
        }
        else{
            this.sideBtn.active=true
        }
    }

    onClick(){
        console.log('点击打开侧边栏')
        let side = cc.instantiate(this.sidePrefab);
        side.parent = this.node;
        side.active = true;
    }

}
